import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 * Creat with IntelliJ IDEA
 * Description
 * User: mamba24
 * Date: 2022-04-28
 * Time: 20:02
 * To BE A Better Person-2020-3-2
 */
public class TestDemo {
    public  static List<Character> func(String s1,String s2){
        ArrayList<Character> arrayList=new ArrayList<>();
        for (int i = 0; i < s1.length(); i++) {
            char c=s1.charAt(i);
            if(!s2.contains(c+"")){
                arrayList.add(c);
            }
        }
        return arrayList;
    }

    public static void main(String[] args) {
        String s1="welcome to bit";
        String s2="come";
        ArrayList<Character> arrayList=new ArrayList<>(func(s1,s2));
        Iterator<Character> it= arrayList.iterator();
        while (it.hasNext()){
            System.out.print(it.next());
        }
    }
}
